home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / code_lib / objlibr / objlib12 / sample2 / mnu.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-06-05  |  3.3 KB  |  122 lines

  1. VERSION 2.00
  2. Begin Form mnu 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   0  'None
  5.    ClientHeight    =   2955
  6.    ClientLeft      =   3270
  7.    ClientTop       =   2115
  8.    ClientWidth     =   7710
  9.    ClipControls    =   0   'False
  10.    ControlBox      =   0   'False
  11.    Height          =   3645
  12.    Left            =   3210
  13.    LinkTopic       =   "Form2"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   197
  17.    ScaleMode       =   3  'Pixel
  18.    ScaleWidth      =   514
  19.    Top             =   1485
  20.    Visible         =   0   'False
  21.    Width           =   7830
  22.    Begin TextBox txt 
  23.       BackColor       =   &H00000000&
  24.       BorderStyle     =   0  'None
  25.       Height          =   285
  26.       Left            =   750
  27.       LinkTopic       =   "ProgMan|ProgMan"
  28.       MultiLine       =   -1  'True
  29.       TabIndex        =   2
  30.       Top             =   150
  31.       Visible         =   0   'False
  32.       Width           =   1275
  33.    End
  34.    Begin PictureBox dosicon 
  35.       AutoRedraw      =   -1  'True
  36.       AutoSize        =   -1  'True
  37.       BorderStyle     =   0  'None
  38.       Height          =   480
  39.       Left            =   60
  40.       Picture         =   MNU.FRX:0000
  41.       ScaleHeight     =   32
  42.       ScaleMode       =   3  'Pixel
  43.       ScaleWidth      =   32
  44.       TabIndex        =   1
  45.       Top             =   90
  46.       Visible         =   0   'False
  47.       Width           =   480
  48.    End
  49.    Begin PictureBox loader 
  50.       AutoRedraw      =   -1  'True
  51.       AutoSize        =   -1  'True
  52.       BackColor       =   &H00C0C0C0&
  53.       BorderStyle     =   0  'None
  54.       Height          =   480
  55.       Left            =   90
  56.       ScaleHeight     =   480
  57.       ScaleWidth      =   480
  58.       TabIndex        =   0
  59.       Top             =   630
  60.       Visible         =   0   'False
  61.       Width           =   480
  62.    End
  63.    Begin Line l 
  64.       X1              =   0
  65.       X2              =   514
  66.       Y1              =   0
  67.       Y2              =   0
  68.    End
  69.    Begin Menu zmnuFile 
  70.       Caption         =   "&File"
  71.       Begin Menu zfile 
  72.          Caption         =   "E&xit"
  73.          Index           =   12
  74.       End
  75.    End
  76.    Begin Menu zmnuPmGroups 
  77.       Caption         =   "&Groups"
  78.       Begin Menu zgroup 
  79.          Index           =   0
  80.       End
  81.    End
  82. Option Explicit
  83. Dim oldstyle&
  84. Dim fheight%, fwidth%
  85. Sub Form_Load ()
  86. Dim res&, r%
  87. If app.PrevInstance Then SendKeys "%B": End
  88. nl$ = Chr$(13) + Chr$(10)
  89. 'adjustment for scalemode of the form
  90. SetScaleData
  91. SetColor
  92. loader.BackColor = cdata.bkg
  93. loader.Move 20, 20, 32, 32
  94. GetPMGroups
  95. 'get rid of caption bar
  96. oldstyle& = GetWindowLong(hWnd, GWL_STYLE): Debug.Print Hex(oldstyle&)
  97. res& = oldstyle& Xor &HC00000: Debug.Print Hex(res&)
  98. res& = SetWindowLong(mnu.hWnd, GWL_STYLE, res&)
  99. ty = screen.TwipsPerPixelY: tx = screen.TwipsPerPixelX
  100. fheight = GetSystemMetrics(15) + 2
  101. fwidth = GetSystemMetrics(0)
  102. mnu.Move 0, 0, fwidth * tx, fheight * ty
  103. 'draw edge line
  104. L.X2 = scalewidth
  105. End Sub
  106. Sub zfile_click (Index As Integer)
  107. Dim r%
  108. Select Case Index
  109. Case 12: Unload Me
  110. End Select
  111. End Sub
  112. Sub zgroup_Click (Index As Integer)
  113. Dim r%
  114. 'load a PM group window
  115. Dim s$
  116. s$ = zgroup(Index).Caption
  117. screen.MousePointer = 11
  118. r = LoadListWindow(s, 0)
  119. r = DoEvents()
  120. screen.MousePointer = 0
  121. End Sub
  122.